package main

import (
	"context"
	"demo01/temp5/test"
	"google.golang.org/grpc"
	"log"
)

func main() {
	conn, err := grpc.Dial("10.10.22.104:50051", grpc.WithInsecure())
	if err != nil {
		log.Fatalf("Failed to connect: %v", err)
	}
	defer conn.Close()
	client := test.NewGreeterClient(conn)

	resp, err := client.TransLanguage(context.Background(), &test.TransLanguageRequest{
		Content: "一个女子，美女，长发，仙气飘飘，神女，白色花朵，桃花树下，手上拿着竖琴，优雅地站着，黑发，粉色汉服 ，古装，金色的花纹，闪闪发光，金光闪闪，精致的手，夜晚，上弦月下，古色古香的阁楼，水彩渲染长安城，古代，大场景云海，广阔的视野，高角度试图，柔和的月光，闪烁的星云，电影照明，8K,详细，数字插画，白紫劫雷",
		Type:    test.TransLanguageRequest_ZNTOEN,
	})
	if err != nil {
		log.Fatalf("Error calling SayHello: %v", err)
	}
	log.Printf("Response from server: %s", resp.Message)
}
